﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x020010F1 RID: 4337
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class SecretKeyInfo : IMessage<SecretKeyInfo>, IMessage, IEquatable<SecretKeyInfo>, IDeepCloneable<SecretKeyInfo>, IBufferMessage
	{
		// Token: 0x170036FA RID: 14074
		// (get) Token: 0x0600C221 RID: 49697 RVA: 0x0020D7F5 File Offset: 0x0020B9F5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<SecretKeyInfo> Parser
		{
			get
			{
				return SecretKeyInfo._parser;
			}
		}

		// Token: 0x170036FB RID: 14075
		// (get) Token: 0x0600C222 RID: 49698 RVA: 0x0020D7FC File Offset: 0x0020B9FC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return SecretKeyInfoReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x170036FC RID: 14076
		// (get) Token: 0x0600C223 RID: 49699 RVA: 0x0020D80E File Offset: 0x0020BA0E
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return SecretKeyInfo.Descriptor;
			}
		}

		// Token: 0x0600C224 RID: 49700 RVA: 0x0020D815 File Offset: 0x0020BA15
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public SecretKeyInfo()
		{
		}

		// Token: 0x0600C225 RID: 49701 RVA: 0x0020D828 File Offset: 0x0020BA28
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public SecretKeyInfo(SecretKeyInfo other) : this()
		{
			this.type_ = other.type_;
			this.secretKey_ = other.secretKey_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x0600C226 RID: 49702 RVA: 0x0020D859 File Offset: 0x0020BA59
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public SecretKeyInfo Clone()
		{
			return new SecretKeyInfo(this);
		}

		// Token: 0x170036FD RID: 14077
		// (get) Token: 0x0600C227 RID: 49703 RVA: 0x0020D861 File Offset: 0x0020BA61
		// (set) Token: 0x0600C228 RID: 49704 RVA: 0x0020D869 File Offset: 0x0020BA69
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public SecretKeyType Type
		{
			get
			{
				return this.type_;
			}
			set
			{
				this.type_ = value;
			}
		}

		// Token: 0x170036FE RID: 14078
		// (get) Token: 0x0600C229 RID: 49705 RVA: 0x0020D872 File Offset: 0x0020BA72
		// (set) Token: 0x0600C22A RID: 49706 RVA: 0x0020D87A File Offset: 0x0020BA7A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public string SecretKey
		{
			get
			{
				return this.secretKey_;
			}
			set
			{
				this.secretKey_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
			}
		}

		// Token: 0x0600C22B RID: 49707 RVA: 0x0020D88D File Offset: 0x0020BA8D
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as SecretKeyInfo);
		}

		// Token: 0x0600C22C RID: 49708 RVA: 0x0020D89C File Offset: 0x0020BA9C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(SecretKeyInfo other)
		{
			return other != null && (other == this || (this.Type == other.Type && !(this.SecretKey != other.SecretKey) && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x0600C22D RID: 49709 RVA: 0x0020D8EC File Offset: 0x0020BAEC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.Type != SecretKeyType.SecretKeyNone)
			{
				num ^= this.Type.GetHashCode();
			}
			if (this.SecretKey.Length != 0)
			{
				num ^= this.SecretKey.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x0600C22E RID: 49710 RVA: 0x0020D94C File Offset: 0x0020BB4C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x0600C22F RID: 49711 RVA: 0x0020D954 File Offset: 0x0020BB54
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x0600C230 RID: 49712 RVA: 0x0020D960 File Offset: 0x0020BB60
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.Type != SecretKeyType.SecretKeyNone)
			{
				output.WriteRawTag(56);
				output.WriteEnum((int)this.Type);
			}
			if (this.SecretKey.Length != 0)
			{
				output.WriteRawTag(122);
				output.WriteString(this.SecretKey);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x0600C231 RID: 49713 RVA: 0x0020D9C0 File Offset: 0x0020BBC0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.Type != SecretKeyType.SecretKeyNone)
			{
				num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Type);
			}
			if (this.SecretKey.Length != 0)
			{
				num += 1 + CodedOutputStream.ComputeStringSize(this.SecretKey);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x0600C232 RID: 49714 RVA: 0x0020DA1C File Offset: 0x0020BC1C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(SecretKeyInfo other)
		{
			if (other == null)
			{
				return;
			}
			if (other.Type != SecretKeyType.SecretKeyNone)
			{
				this.Type = other.Type;
			}
			if (other.SecretKey.Length != 0)
			{
				this.SecretKey = other.SecretKey;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x0600C233 RID: 49715 RVA: 0x0020DA71 File Offset: 0x0020BC71
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x0600C234 RID: 49716 RVA: 0x0020DA7C File Offset: 0x0020BC7C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num != 56U)
				{
					if (num != 122U)
					{
						this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
					}
					else
					{
						this.SecretKey = input.ReadString();
					}
				}
				else
				{
					this.Type = (SecretKeyType)input.ReadEnum();
				}
			}
		}

		// Token: 0x04004E6E RID: 20078
		private static readonly MessageParser<SecretKeyInfo> _parser = new MessageParser<SecretKeyInfo>(() => new SecretKeyInfo());

		// Token: 0x04004E6F RID: 20079
		private UnknownFieldSet _unknownFields;

		// Token: 0x04004E70 RID: 20080
		public const int TypeFieldNumber = 7;

		// Token: 0x04004E71 RID: 20081
		private SecretKeyType type_;

		// Token: 0x04004E72 RID: 20082
		public const int SecretKeyFieldNumber = 15;

		// Token: 0x04004E73 RID: 20083
		private string secretKey_ = "";
	}
}
